package cn.starlightsoftware.sherly.service.auth;

import cn.starlightsoftware.sherly.controller.admin.auth.vo.LoginReqVO;
import cn.starlightsoftware.sherly.controller.admin.auth.vo.LoginRespVO;
import cn.starlightsoftware.sherly.db.model.user.UserDO;

import javax.validation.Valid;

/**
 * @author 谷子毅
 */
public interface AuthService {

    /**
     * 账号密码登录
     * @param reqVO
     * @return
     */
    LoginRespVO login(@Valid LoginReqVO reqVO);

    /**
     * 校验账号密码并获取用户
     * @param username
     * @param password
     * @return
     */
    UserDO authenticate(String username, String password);

    /**
     * 登出
     */
    void logout();
}
